<?php


/**
 * Goods class.
**/
class Goods extends EMongoEmbeddedDocument {
	
	public $gid;
	public $position;
	public $rotation;
	
	public function getCollectionName() {
		return 'Goods';
	}
	/**
	 * This method have to be defined in every model, like with normal CActiveRecord
	 */
	public static function model($className = __CLASS__) {
		return parent :: model($className);
	}
		
	public static function findByGid($gid) {
		return $goods = self :: model()->findByAttributes(array ('_id' => $gid));
	}
	
}